var status = -1;
var Energy = 1000;
function action(mode, type, selection) {
	if (mode == 1) {
		status++;
	} else {
		if (status == 0) {
			cm.dispose();
		}
		status--;
	}
	if (status == 0) {
		cm.sendYesNo("看来你已经完成了所有关卡了哟.现在是不是要领取奖励离开副本呢");
	} else if (status == 1) {
		cm.sendNext("好的,现在送你" + Energy + "PPMS活跃值.\r\n#v2614046#x1 #v5062000#x1 #v5062002#x1 #v5062009#x1 #v2432634#x2 #v2431290#x2 抵用卷x1000");
	} else if (status == 2) {
		cm.gainPlayerPoints(Energy);
		cm.gainItem(2614046, 1);
		cm.gainItem(5062002, 1);
		cm.gainItem(5062000, 1);		
		cm.gainItem(5062009, 1);
		cm.gainItem(2432634, 2);		
		cm.gainItem(2431290, 2);	
	    cm.givePartyNX(2,1000);	
		cm.worldSpouseMessage(0x15, "『高校』 : " + cm.getChar().getName() + " 完成了所有课程，获得了系统送的 " + Energy + " 点PPMS活跃。");
		cm.warp(744000000);
		cm.dispose();
	}
}
